<?php
declare (strict_types=1);

namespace app\common\model;

class Express extends Base
{
    protected $name = 'express';


    public static function recordLog($model)
    {

        $emp_id = session('admin_id');
        $emp_name = Admin::where('id', $emp_id)->value('admin_name');
        $title = '快递';
        $operation = getOperation($model->operation);
        if(in_array($model->operation,['updateAll','deleteAll'])){
            $msg = $operation .'【' . $title . '】'. '标识ID【' . implode(',',$model->ids) . '】';
            Logs::adds($msg, $emp_id, $emp_name);
        }else{
            $msg = $operation .'【' . $title . '】'. '标识ID【' . $model->id . '】快递名称【' . $model->title . '】';
            Logs::adds($msg, $emp_id, $emp_name);
        }
    }

}
